'; window.popUpWin.document.write(zhtm); window.popUpWin.document.close(); // Johnny Jackson 4/28/98 } //--> Inside AutoCAD 14 -- Ch 27 -- Publishing on the Web


Inside AutoCAD 14

Previous chapterNext chapterContents


- 27 -

Publishing on the Web


by Mark Sage

With the integration of Internet access functionality into Release 14, AutoCAD has become "web-enabled." At the same time, Autodesk's WHIP! technology has "CAD-enabled" the web. The merger of these two technologies delivers very powerful tools to web-savvy designers. In this chapter, you learn how to integrate these exciting new capabilities into your current engineering practices. Useful information to help fur-ther your understanding of the Internet is also included. Exercises in this chapter help you learn how to use AutoCAD's Internet functionality to:

Sending CAD Data Over the Internet: What's It All About?

The World Wide Web has become a pervasive medium for computing. For many firms, the role of the Internet as a serious business tool has not yet been made clear, with numerous web sites implemented strictly for marketing purposes. Yet, for creators and users of CAD data, the Internet provides an environment that greatly benefits the engineering community. From a CAD perspective, the web is the ideal mechanism for facilitating collaborative design and real-time communication.

Ask 100 people to define the Internet and you are likely to receive 100 different answers. That's because the web is something different to everyone. To one person it may be a valuable research tool, to another an e-mail system, and someone else may consider it strictly as an entertainment media. The Internet is all these things and much, much more. For you and your colleagues, using the World Wide Web offers the opportunity to expand the reach of your business.

The Internet and the World Wide Web deliver powerful tools and new ways to enhance the virtual reach of your business. With these new Net tools, you can offer potential customers immediate access to technical drawing data, specifications, or other key project data.

Internets versus Intranets

The Internet is a global network made up of other networks that communicate with each other consistently. People using the Internet can access services from other computers. Much of the resources available through the networks are free. The services available on the Internet include:

An intranet offers services similar to those previously noted, but is an internal corporate network. Instead of being hooked up to the world, an intranet is an internal corporate resource. The purpose of an intranet is to deliver internal information about the company's resources to each employee. Intranet access is secure and typically limited to designated employees with external access prevented by a firewall.

Impact of the Internet on CAD

The Internet has a wide variety of uses, and new capabilities emerge on a daily basis. As previously noted, the web is used for marketing, software distribution, retail sales, stock trading, entertainment, market research, e-mail, and more. Companies with a presence on the web (a web site) deliver information to a global audience, saving time, the cost of materials, and shipping and handling. Web users get the benefits of rapid access to information they need at little cost. The Internet lends itself particularly well to communicating technical information (such as CAD drawing information) or data about sophisticated products (such as AutoCAD Release 14). Most important, the Internet can deliver information targeted at an audience with interests similar to yours.

Manufacturers' information is becoming widely available online in electronic formats, ready to be inserted into a CAD drawing. Designers and manufacturers save time while improving accuracy and overall project quality. Online training programs improve the skills of designers while reducing the cost of keeping current with changing technologies.

Direct Benefits of the Net for CAD

With Internet-enabled Release 14, multiple designers at various locations can view, redline, or edit your drawings in real-time. This new technology is highly beneficial, facilitating the coordination of large or small projects. With AutoCAD Release 14, you can access .DWG files anywhere in the world at any time via the Internet. No more waiting for a drawing file to arrive by overnight courier. This immediate access reduces cycle time and travel costs while increasing quality through enhanced communications. Bids for new projects can be searched, solicited, and submitted online, opening up new opportunities for companies that may not have had the resources to previously participate in such processes. Questions and proposals are e-mailed, and the time saved is put to better use in refining the bid. A product portfolio of the firm's successful projects can be converted into a web site. This expands the audience for your services, resulting in greater market exposure and potentially higher revenues.

Understanding the Capabilities of a Web-enabled AutoCAD Release 14

The web enabling of AutoCAD actually began with the AutoCAD Release 13 Internet Publishing Kit (IPK). The IPK included some utilities for accessing .DWG files across the Net of the WHIP! Plug-In for Netscape Navigator, and the capability to create DWF files from inside Release 13. With Release 14, some key elements of the IPK have been integrated into AutoCAD, resulting in a more seamless, Internet-friendly product. A web-enabled AutoCAD Release 14 includes components divided into the following three categories:

Each of these categories is examined in the following sections.

Release 14's ARX Internet Applets

AutoCAD Release 14 contains four separate demand loaded ObjectARX applets that web-enable the product:

In combination, these applets comprise the AutoCAD Internet Utilities. By default, these files get installed into the root ACADR14 directory (you may have a different AutoCAD directory name). Because these applets are based on ObjectARX, they can be updated asynchronously from AutoCAD or each other. Given that the web changes so rapidly, this design enables each component to include the latest technology.

Toolbars/Menus

Access to most of the Internet Utilities (such as the OpenURL or AttachURL commands) is available either through the Command: line or Toolbar. Unfortunately, no partial pull-down menu entries are provided with Release 14. The only web-related function available by pull-down is the creation of DWF files. The Files pull-down menu provides support for creating DWF files under the Export option. As with all file formats created by the Export dialog box, no icon is provided. DWFOUT is the command-line equivalent of the Export|DWF menu function. For more information, please refer to the section "Creating DWF Files with the DWFOUT Command," later in this chapter.


NOTE: The Internet Utilities Toolbar will only be installed if Full or Custom installation is selected.

Release 14's Internet Utilities toolbar includes nine icon buttons as shown in figure 27.1. Each icon includes a helpful tooltip description.

Figure 27.1 The AutoCAD Internet Utilities toolbar. Pausing the cursor over the icon displays the associated tooltip.

Help System

New to this version of AutoCAD is the capability to connect directly to the Release 14 home page at Autodesk (if so defined). In the Help pull-down menu is the new item, Connect to Internet. When chosen, the system's configured web browser is launched, and the system changes focus to your web browser. Complete context-sensitive help for the Release 14 Internet functionality is built in to the AutoCAD Help system. As shown in figure 27.2, online help is available for all the web-enabling features of AutoCAD Release 14.


NOTE: Only Netscape Navigator 3.0x, Navigator 4.0 (Communicator), or Microsoft Internet Explorer 3.0 browsers are supported by AutoCAD Release 14.

Figure 27.2 AutoCAD Release 14's Help system includes support for the Internet functions.

Viewing Design Data on the Web

It is essential to have the capability to view design data, such as drawing files, on the web if you are going to add the Internet to your arsenal of design tools. With the extensive incorporation of the WHIP! technology into Release 14's graphics pipeline, Autodesk furthers your ability to accomplish this key task. AutoCAD Release 14 supports the launching of your web browser from inside the product and creates web-friendly DWF files. In addition, Autodesk offers browser plug-ins that support viewing of DWG (Autodesk View) and DWF (WHIP! Release 2) files.

BROWSER Command: Release 14's Connect to Internet Feature

The Browser command launches the Internet web browser that is associated with .HTM in the system registry. This command is available from the Help pull-down (Connect to Internet), the Standard toolbar menu, or the Command: prompt. When invoked from the toolbar or the pull-down menu, the Browser command does not prompt for a location (URL). A system variable (INETLOCATION) contains the URL address that the browser will invoke.

When the Browser command is issued at the Command: prompt, the command window shows the following:

Location <www.autodesk.com/acaduser>:

At this point you may press Enter to accept the default location or type in a new address. AutoCAD then launches the web browser, and your browser then goes to the specified location (URL).


TIP: AutoCAD won't launch a new instance of your browser if the browser is already running. Your browser will go to the URL specified by AutoCAD's INETLOCATION system variable. You can use your browser's Back button to return to the location that was active prior to using AutoCAD Release 14's Browser command.

Understanding DWF Files

AutoCAD Release 14 writes (but does not read) DWF files. In essence, a DWF file is like an electronic plot--it facilitates the viewing of CAD drawings on the World Wide Web. DWF is a file format for viewing CAD data published to the web through your Internet browser. DWF is not intended to be a CAD file format used to create engineering documents, but to publish them. As previously explained, Autodesk (and other software companies) offer web browser plug-ins that support viewing of DWG and DWF files.

The Drawing Web Format was developed because current, widely accepted, two-dimensional vector file standards did not address the needs of Internet-aware applications and because existing commercial formats are too closely tied to specific proprietary data structures to support the exchange of illustrations among systems.

Specifically, the Drawing Web Format was developed for the following purposes:

What Is DWF?

DWF is intended for the efficient viewing of CAD drawing data on the web (an electronic plot). DWF is not intended for the interchange of higher-level data between applications. DWF is a file format for the standardized description of two-dimensional, vector-based drawings and illustrations.

The primary features of DWF files are:

The preceding list summarized the main features of a DWF file. The primary benefits of using the DWF file type are described in the following section.

Benefits of DWF

You should note several benefits of using the DWF file format. The main advantages are summarized as follows:

Speed

DWF files are vector-based, making them more efficient than bitmaps or other file formats for storing and displaying design information. In addition, DWF files are transmitted in compressed form, further reducing download time. As a result, DWF drawings are faster to download and faster to use. Panning and zooming are virtually instantaneous because there's no need to reload images or access the server.

Accuracy

AutoCAD Release 14 supports creating DWF files with up to 32-bit precision, ensuring that your designs can maintain the detail you expect with AutoCAD. Within the DWF file, vector data is stored as lines, arcs, and circles, as opposed to the individual pixels found in bitmap file formats such as GIF and JPEG. Vector images are a more efficient and robust method for storing precise, detailed graphic information, such as technical illustrations and CAD drawings.

Security

DWF supports both secure and open data. For liability reasons, electronic transfer of engineering data has been fairly limited. DWF files don't expose all the drawing file data to the public. This means that you can showcase your work, yet maintain ownership of the intellectual property contained within the drawing file.

Ease of Use

Creating DWF files with AutoCAD Release 14 is a simple matter, as shown later in the chapter. Publishing DWF files to the web is quite easy as noted in the section titled "Publishing Your Drawings on the Web." Viewing DWF files with Autodesk's WHIP! browser tool is an intuitive and straightforward process.

The DWF File Specification

DWF files are organized into three main sections:

Data in the file header and the trailer is in readable ASCII text. Data in the file data block is delimited by operation codes (opcodes) and argument data used by the opcodes (operands). The two types of opcode-operand pairs are: readable ASCII text and coded binary.

All DWF operations have a readable ASCII opcode/operand form, and most operations also have a coded binary opcode/operand form. By using the proper opcode form, you can create a file that is humanly readable (ASCII), one that is more efficient from a processing and storage point of view (binary), or (more commonly) a mixture of both types (ASCII and binary).

An application reading a DWF file may not understand a set of opcodes, especially when the application reading the file outdates the application that created the file. For this reason, DWF is designed to enable a file reader to skip most opcodes. For the file reader to skip an opcode, it must know the length of its operand. DWF has three categories of opcodes:

For more information on the DWF file specification, a complete copy of the WHIP!/DWF Developers Toolkit is available for downloading at no charge from the Autodesk web site.

Viewing DWG Files

Now that the DWF file format has been covered, it's time to discuss the role that DWG files have on the web. First, it is important to reiterate that DWF does not supplant the DWG format. Remember that DWF is like an electronic plot file, containing only the information needed to convey the visual representation of the drawing. DWG files contain greater amounts of drawing data (object associations, xdata, styles, and so on) and in a higher order of precision. Both formats have their proper place on the web.

The viewing and use of DWF files can be considered an important tool for the communication of drawing information on the Internet. DWG files are essential components of any corporate intranet. The bandwidth and performance constraints of the Internet do not necessarily apply to an intranet. Also, due to the inherently secure nature of an intranet, issues surrounding protection of the intellectual property contained in DWG files are minimized. In an intranet setting, the use of DWG files facilitates internal collaborative design work.

The following example illustrates the role each file format plays in the design process. During the initial phase of a project, the internal development team creates the basic product design by using Release 14. An interdepartmental team reviews the initial design (DWG file) on the corporate intranet using their browser and DWG viewing plug-in. Comments are made via e-mail or by directly editing the DWG file using AutoCAD. Once approved, ownership of the project is passed to the Engineering department, which elects to subcontract various elements. The drawing file is converted to DWF, and a notice is placed on the company web site soliciting bids for certain aspects of the project. Prospective bidders view the DWF file on the web and submit their proposals accordingly.

Tools for Viewing DWG Files on the Web

Numerous tools are available for viewing DWG on the Internet. A preview version of the Autodesk View DWG Plug-in that delivers functional DWG viewing support is include with the Release 13 Internet Publishing Kit. An enhanced version of the View DWGX Plug-in (Release 1.2) also supports redlining and other DWG viewing capabilities such as layer control. Release 1.2 of the DWGX Plug-in is included with Autodesk Work Center and requires that a client version of Autodesk View be installed on the host PC. The Autodesk DWG View Plug-in has an interface similar to that of WHIP!, as shown in figure 27.3.

Figure 27.3 The DWG View Plug-in supports a right-click user interface menu.

SoftSource's Vdraft plug-in adds support for viewing DXF in addition to DWG and DWF files.


[BEGG]WARNING: DWG performance issues: Be judicious about which DWG files you choose to publish on the Internet. Unlike DWF, the DWG file format is not "web" friendly. Features such as streaming and compression are the domain of DWF. Also please recognize that the average DWG file is very large, resulting in lengthy load times for clients who access the Internet with a low-speed modem.

Viewing DWF Files with WHIP!

DWG has limitations that reduce its usefulness as an Internet-based design collaboration medium. To overcome this limitation, AutoCAD Release 14 supports generation of DWF files. In this section, we will study WHIP!, Autodesk's DWF web browser viewing tool. Again, please remember that DWF does not replace DWG files.

The WHIP! Browser Tool

The WHIP! Plug-In and ActiveX Control are Autodesk's Internet tools for viewing DWF files on your web browser. WHIP! Release 2 is written to the WIN32 API specification, which means that the Plug-in and Control support the Windows 95 and Windows NT operating systems only. Support of other platforms has not been readily forthcoming from Autodesk. However, Autodesk does offer a developer's toolkit that enables independent developers to port the plug-in to other platforms.


NOTE: I expect that we will see independently developed DWF browser plug-ins on the market sometime soon.

How to Get the WHIP! Browser Tool

Autodesk makes WHIP! available for download at no charge from their web site. You can obtain WHIP! Release 2 by pointing your browser to http://www.autodesk.com/products/autocad/whip/whip.htm. The WHIP! home page contains download, installation, and user guide information.

What's New in WHIP! Release 2

Even if you are familiar with WHIP!, you may not know about several new features in WHIP! Release 2. Named Views and DWF View Coordinates are two new features of Release 2 and are discussed in the following sections.

Named Views

Some DWG files have named views for use with AutoCAD. With AutoCAD Release 14, the named views are passed along to the DWF file. Any named views that are present in the DWG file (when the DWF file is generated) are recorded in the DWF. For convenience, if the named view INITIAL is not already specified in the DWG, this named view is automatically placed in the DWF file. The INITIAL view for the DWF matches the view of the DWG when the DWFOUT command is issued. Named views of DWF files are available via a pop-up dialog box off the WHIP! Release 2 right mouse button menu.

WHIP! Release 2 incorporates support for named views into the right-click menu. Right-clicking a DWF file pops up the WHIP! menu. The Named Views menu option only appears when the loaded DWF file contains named views. Choosing Named Views from the right button menu displays a modeless dialog box that lists previously defined views to select from, as shown in figure 27.4. This option only appears when the loaded DWF file contains named views. Double-clicking on the named view positions the browser to that view. You can also single-click a named view and then click on OK to select that view and dismiss the dialog box. Alternatively, you can click on Cancel to dismiss the dialog box.

Figure 27.4 The WHIP! Release 2 Named View selection dialog box.

DWF View Coordinates

DWF file coordinates can be determined when viewing a DWF. Position the drawing to a desired view by panning and zooming. Issue the About WHIP! command from the right mouse button menu. One of the items listed, current view coordinates, is shown in figure 27.5. These coordinates can be noted and used in HTML files.

Figure 27.5 The WHIP! Release 2 About WHIP! dialog box displays the DWF view coordinates.


The WHIP! Release 2 Interface

When the cursor is over the WHIP! window, pressing the right mouse button will display a menu. The menu enables you to select from various "modes" of operation. A discussion of each mode follows.


TIP: Viewing DWF files with Netscape Navigator is made possible by having the server-side software export the drawing/x-dwf MIME type. If the server-side software is Microsoft's Internet Information Server, however, this is not always the case. In some WHIP! installations the MIME type has to be registered on the client side for Netscape Navigator. This problem appears to be a rare occurrence and is machine specific. Should you encounter this problem, complete the following procedure: For example, in Navigator 3.0x, access the Options pull-down menu, select the Helper tab located under the General Preferences menu option. Click on the Create New Type button. At the Mime Type field, enter drawing. In the Mime Subtype field, enter x-dwf. For the Unknown Action field, enter the file extension as dwf. Click on OK.

Pan and Zoom Features

By now you are already familiar with the WHIP! display driver menu. In addition to the normal WHIP! driver options, WHIP! Release 2 adds support for a Fit to Window function. When selected from inside an HTML, the DWF file being viewed fills the entire browser window. To return to normal viewing, select the Back button from either the WHIP! Release 2 menu or your browser's toolbar.

Highlighting URLs in DWF files

When you right-click and toggle the Highlight URLs check item, WHIP! identifies all the URLs in a drawing by highlighting a box over each URL region. This enables you to see where URLs are before navigating. To avoid matching the color of the background or geometry in the DWF file, the box is drawn in alternating light-gray, dark-gray, and clear colors. Rendering in the clear color enables you to see the geometry underneath the box. To remove the boxes, right-click again and select Highlight URLs again to remove the check. The Highlight URLs menu item is available when a DWF file contains at least one URL.


NOTE: When viewing a DWF file contained in an HTML document that is being displayed in a scrollable frame, only the URLs directly under the Highlight URLs right-click menu box flash. The problem only exists in frames that are scrollable. By setting "scrolling" to "no" in the frame definition code, the problem disappears.


TIP: A keyboard accelerator exists for WHIP! URL highlighting. Holding down the Shift key acts as a shortcut for highlighting URLs. Releasing the Shift key is a shortcut for dehighlighting.

Using SaveAs

If you right-click and select SaveAs, you can save the DWF file to your local hard drive. You may choose to save the DWF file in one of three formats: DWF, DWG, or Windows Bitmap (BMP). If you select DWG, WHIP! copies the DWG file used to generate the DWF, provided that the DWG file is available. The SaveAs menu item becomes available after the streaming of the DWF file completes.


NOTE: When looking for a DWG file, WHIP! looks in the directory where the DWF file is stored. The DWF file and DWG file must all reside in the same directory for this feature to work. Should the file not exist in the same directory, an error message is generated that indicates that the DWG file is not available and the SaveAs fails.

Printing DWF Files from Your Browser

You can print a DWF file in two different ways: from the WHIP! Release 2 menu and from the Browser menu. If you right-click over a window containing a DWF file and select Print, the currently visible view is sent to the printer using the standard system controls. When you use WHIP!'s Print menu item, only the DWF file prints. Using your browser Print button results in the entire HTML file--including the embedded DWF file--to print. When printing using the browser menu item, you have the option to force the background color of the DWF file to white via the Print dialog box.

In this section you have studied how to view DWF-based CAD data on the web with Release 2 of WHIP! In the next section, you will learn how to use the Internet to bring DWG data into AutoCAD Release 14.

Accessing CAD Data from the Web in Release 14

As mentioned previously in this chapter, new features of Release 14 enable you to access CAD data from the web. Before you can take advantage of these capabilities, however, you must modify the appropriate AutoCAD settings for your web use.

Configuring Release 14 for Internet Access

If you want to change where the Launch Browser button takes you, the value of a new Release 14 system variable, INETLOCATION, must be modified. To use Release 14's Internet Utilities, AutoCAD must be properly configured for Internet access. The INETCONFIG command provides a convenient method for configuring AutoCAD's Internet access capabilities. A discussion of these commands follows.

The INETLOCATION System Variable

Release 14's default URL information is stored in a profilable system variable, INETLOCATION. You may store a different URL default for each saved profile. You can easily modify the default value (URL address) of this variable, which AutoCAD passes to your browser. To change the URL invoked by the BROWSER command, type INETLOCATION at the Command: prompt. You will be prompted as follows:

New value for INETLOCATION <www.autodesk.com/acaduser>:

Type in the new URL you want to have your browser go to when launched by AutoCAD.


TIP: You can choose to type http:// at the beginning of the URL if you want. The Release 14 Browser command checks for the presence of http://, ftp://, and file:/// prefixes. If none of the standard Internet prefixes exist, AutoCAD will attach http:// to the URL for you. This handy little feature is both a time-saver and a convenience tool, enabling you to type in the URL in the manner you are accustomed.

INETLOCATION can also be changed from Preferences in the Files tab as seen in figure 27.6.

Figure 27.6 Modifying the profilable INETLOCATION system variable enables you to change the default URL launched by the Browser command.

The following exercise takes you through the necessary steps to modify Release 14's "home" URL.

MODIFYING RELEASE 14'S "HOME" URL IN PREFERENCES

1. From the Tools pull-down menu, choose Preferences.

2. Select the Files tab.

3. Scroll to the Menu, Help, Log, and Miscellaneous File Names entry as shown in figure 27.6.

4. Expand the selection by double-clicking.

5. Select and expand Default Internet Location by double-clicking on the entry.

6. Replace the default entry www.autodesk.com/acaduser with the WHIP! home page URL. Type in www.autodesk.com/products/autocad/whip/whip.htm.

7. Click on OK.


You have now successfully changed the Browser default to the WHIP! home page.

Another command used in modifying AutoCAD's Internet access capabilities is INETCFG. The INETCFG command is examined in the following section.

Configuring Your Internet Connection with INETCFG

INETCFG is used for setting user name, password, and other Release 14 Internet connection information. Choose the Configure Internet Icon from the Internet Utilities toolbar, or enter inetcfg at the Command: prompt. You can also access the INETCFG command by clicking on the Options button on the OPENURL, SAVEURL, and INSERTURL dialog boxes. The Internet Configuration dialog box, where you must enter all relevant information, is shown in figure 27.7.

Figure 27.7 The Internet Configuration dialog box simplifies the process of readying Release 14 to access the web.

The following list discusses the areas in the Internet Configuration dialog box that require configuration information:


NOTE: AutoCAD does store your user name for the FTP and HTTP logins, but not your password between sessions. Each new AutoCAD session requires you to enter your password when entering secured sites.


NOTE: A proxy server is a machine that serves as a gateway between a company's internal intranet and the external Internet. A proxy server typically runs on a firewall machine, providing secure access to the outside world for people inside the firewall. The proxy server provides various services, mainly caching of requests and a secure means of accessing data. If you don't know if you are using a proxy server, you can look at the proxy settings in your browser (in Netscape Navigator 3.0x, choose the Options menu, then Network Preferences, then the Proxies tab) or contact your network system administrator.

Extending Your Reach to Drawing Data on the Web

The first step to publishing your AutoCAD designs on the web involves creating a new drawing or opening an existing drawing, embedding URLs (if desired), and saving the drawing as a DWF file. With AutoCAD Release 14 you can extend your access to CAD data beyond the desktop and LAN to the Internet. Commands that let you open, insert, and save AutoCAD drawings over the web are included in AutoCAD Release 14.

You can open an AutoCAD drawing from the web as though it resided on your local area network or hard disk. Think of the Internet as just another network drive which you can connect to for accessing drawing data. Release 14's Internet functions extend access to CAD data beyond the desktop or network. With http, ftp, and Release 14, you can access drawing files anywhere on the Internet.


NOTE: When you are connected to the Internet through a proxy server, the AutoCAD Internet Utilities cannot transfer files (Open, Insert, or Save) using FTP.

Using HTTP and the OpenURL Command

Use the OpenURL command to Open a drawing from the Internet. The OpenURL command in Release 14 can be invoked from the Open DWG from URL icon in the Internet Utilities toolbar or at the Command: prompt. Once invoked, a "special" file open dialog box is presented, as shown in figure 27.8. In the Open DWG from URL text box, enter the URL of the file you want to access and then click on the Open button. The Open DWG from URL box supports entering an URL in the following formats:

http://servername/pathname/filename.dwg ftp://servername/pathname/filename.dwg file:///drive|/pathname/filename.dwg

The Open DWG from URL text box also features a drop-down list as shown in figure 27.8. This drop-down list maintains a history of previously used URLs, which is very handy should you repeatedly visit a site.


TIP: The URL text in the drop down list can also be edited before pressing the Open button. If you are re-visiting a site but want to open a different drawing, you can just edit the drawing file name. What a time-saver that is!

Figure 27.8 The Open DWG from URL dialog box includes a handy drop-down URL history list.



TIP: You can use the Browser (Connect to Internet) button to find a web site containing a drawing you want to open. After you identify a web site, copy the URL from your browser and paste it into the Open DWG from URL dialog box.

Clicking the Options button in the Open DWG from URL dialog invokes the INETCFG command, enabling you to change your Internet configuration settings. After entering an URL and clicking on OK, AutoCAD displays the Remote Transfer dialog box. The Remote Transfer dialog box is also displayed during inserting or saving a drawing to an URL. You can terminate the transfer by clicking on the Cancel button.


NOTE: AutoCAD Release 14's Internet Utilities do not check to confirm that an Internet connection exists. If you're not connected to the Internet and you attempt to connect to a web location, the Transfer Status dialog box will display 0 bytes and 0% complete until you click on the Cancel button or the transfer times out.

The following brief exercise shows you how to open a sample DWG file located at the Autodesk web site.

OPENING A DRAWING FROM A WEB SITE

1. Select the Open from URL icon in Internet Utilities toolbar.

2. Enter the following URL into the Open DWG from URL text box:

http://www.autodesk.com/exercise/colorwh.dwg

3. Press Enter.

Using InsertURL to Insert a DWG File into Release 14

The InsertURL command performs an insert of a drawing accessed from the Internet into AutoCAD. You can insert an AutoCAD drawing--a block, for example--from the web into your current drawing session with the InsertURL command. The InsertURL command is accessed by choosing Insert from URL from the Internet Utilities toolbar or by entering inserturl at the Command: prompt. The dialog box for InsertURL appears very similar to the Open DWG from URL dialog box. The URL formats supported by OpenURL apply to the InsertUrl function as well. After the DWG file has completed downloading, Release 14's normal INSERT behavior commences.


NOTE: You cannot insert a drawing into itself.

Using FTP and SaveURL to Save a DWG to the Web

With Release 14's SaveURL command, you can write a DWG file to a location on the web. From the Internet Utilities toolbar, select Save to URL or enter saveurl at the Command: prompt. Again, a dialog box similar in form to that used by the Open and Insert URL commands appears. Enter the URL in the Save DWG to Internet text box and then click on the Save button. You must enter an URL in the following format (http and file schemes are not supported):

ftp://servername/pathname/filename.dwg

If you click on the Browser button, you can use your browser to find a web site. After you identify a web site, you can copy its URL from your browser and paste it into the Save DWG to URL dialog box. After you click on OK, AutoCAD displays the Remote dialog box while it saves the drawing to the web site. The Save to URL dialog box also includes access to the INETCFG command via the Options button.

You can change your Internet configuration settings while in the Save to URL dialog box by clicking the Options button. Selecting Options runs the INETCFG command, enabling you to change your Internet configuration (such as login name or password) settings.


NOTE: AutoCAD Internet Utilities cannot transfer files using FTP when you are connected to the Internet through a proxy server.

Using Drag and Drop to Open or Insert DWG Files

A great productivity enhancement included with Release 14 is the DWF Drag and Drop feature. Rather than having to execute the Open or Insert URL command and type in the web address, Release 14 enables you to drag the DWF and drop the parent DWG into your current AutoCAD session.

While viewing a DWF file, you can open or insert the original DWG file in AutoCAD by dragging the DWF image from Netscape into AutoCAD.


NOTE: For drag and drop to work, the DWG file used to create the DWF file must exist in the same directory as the DWF file at the time you drag and drop.

To open a DWG in AutoCAD using drag and drop, follow these steps:

1. Press and hold the Ctrl and Shift keys simultaneously.

2. Click on the DWF image and drag it into AutoCAD.

3. Release the mouse button and then release the Ctrl and Shift keys.

To insert a DWG into a current AutoCAD drawing session using drag and drop, do the following:

1. Press and hold the Ctrl key.

2. Click on the DWF image and drag it into AutoCAD.

3. Release the mouse button and then release the Ctrl key.

Autodesk's Data Publishing (ADP) division has a service comprised of an online catalog of mechanical parts called PartSpec OnLine. Subscribers to this service can drag a needed part into an active AutoCAD session. ADP provides a method for you to sample this functionality. The following exercise illustrates how to implement these steps using a real file and dragging it into AutoCAD.

DRAGGING A FILE FROM PARTSPEC ONLINE INTO AUTOCAD

1. At the Command: line, enter INETLOCATION.

2. Type the ADP URL http://data.autodesk.com/adpon2.htm.

3. Click on the Browser (Launch Browser) button.

4. Register as a user of this site if you haven't already done so. Once your form is complete then select the SUBMIT button and go to step 6.

5. If you are registered, then click on the blue PartSpec Online ICON in the center of the screen.

6. Enter your Username and Password in the dialog box and click on the OK button.

7. You should now be at the Part Spec Online Home Page (http://data.autodesk.com/partspec/partspec.htm).

8. From the Select a Manufacturers frame (left side frame), choose ADEPT TECHNOLOGY, INC. (see fig. 27.9).

9. Select 4-AXIS SCARA ROBOTS. A listing of Adept's robots appears.

10. Select the ADEPT 1850 PALLETIZING ROBOT. The part frame becomes active, revealing product information.

11. Select the View Window tab from the part information frame on the right.

12. Choose Top from the View Control.

13. Press and hold the Ctrl and Shift keys simultaneously.

14. Click on the DWF image and drag it into AutoCAD.

15. Release the mouse button and then release the Ctrl and Shift keys.

16. Change focus to Release 14 by using the Windows Alt+Tab key combination.

17. Follow the Insert prompts at the AutoCAD Command: line.

Figure 27.9 Release 14's DWF Drag and Drop feature simplifies accessing DWG files from the Internet.

Publishing Your Drawings on the Web

Now that you have mastered viewing and accessing DWG or DWF files with Release 14 and the Internet, the time has come for you to start creating some of these files yourself and publishing them onto the Internet. So how do you do this in such a manner that protects your investment in the drawing file data? How can you create enough interest in your data that people come to your site? This section presents an informative discussion regarding the considerations and decisions involved in publishing CAD data on the web.

Strategies for a Secure Web Site

Your site should be partitioned for different levels of access. For example, you should have one level assigned for general public access, another access level for prospective clients and yet another for existing clients or subcontractors. You can configure your firewall software to limit general public access while delivering greater levels of access to your customers and total access to your own employees. A comprehensive discussion of firewall software and security issues is provided by Netscape on their web site.

DWG-DWF File Co-location

Autodesk recognizes the need for you to be able to adequately protect the intellectual property contained in the DWG files of your creation. To facilitate this need, the DWF to DWG drag and drop functionality has a very simple yet sophisticated security mechanism. When a DWF file is created, the file name of the parent DWG is embedded into the DWF file header. Only the file name is embedded, and all path information is stripped out. When AutoCAD receives a notification of an Internet-based drop event, Release 14 searches the directory location passed to it during the notification process for the parent DWG file. Should the DWG file be located in the same directory as the child DWF file, then AutoCAD proceeds with the appropriate Open or Insert function. Should the parent DWG file not be located in the same directory as the DWF, however, the operation will abort with a file not found error.

Hence, it is a simple matter for you to control which DWG files you make available for downloading by visitors to your web site. This activity is controlled by either including or excluding the parent DWG file from the directory containing the child DWF. This system allows for maximum flexibility and controlled access. With your firewall software, you can place your most sensitive DWG files (and associated DWFs) in those directories with the highest degree of secured access.

Creating Web-friendly CAD Files

Now that you have a handle on how to protect your data, you can start building files. This section studies how to embed links into DWG files and then create web-friendly DWF files.

Attaching an URL

The ATTACHURL command embeds a hyperlink onto an object in the Release 14 drawing file. You can attach an URL either to objects or areas in a drawing. When you view the resultant DWF file and select the object or area, you are hyperlinked to the site identified by the attached URL.

As previously noted, you can attach URLs in drawings in two ways: by objects and by area.

When you attach an URL by objects, AutoCAD places a rectangular URL area around each object. The URL is attached as xdata (extended entity data) to objects in the drawing. For each object with an URL attached there is a separate xdata entry. If you attach many individual objects to an URL, your AutoCAD DWG file will contain many bits of xdata attached to each selected object.

When you attach an URL to an area, AutoCAD creates a rectangle around the area you specify and stores the rectangle on a special layer called URLLAYER. Don't delete this layer. For each URL attached there is xdata, just as when you attach using the by object mode, but your AutoCAD DWG file will contain large areas attached as xdata and not individual objects.


TIP: Deciding whether to attach by area or object is sometimes confusing. I have found that attaching by area works well for sections of contiguous geometry. Also, when I want to attach a hyperlink to area where no geometry exists, attaching by area is the only viable method. When geometry is distributed throughout the drawing, attaching by objects is the best method.

Embedding Links

One of greatest features of the ATTACHURL command is that the specified URL does not have to refer to an absolute address. ATTACHURL also supports the capability to embed relative URLs. This means that you can create a DWF file that links to another DWF that displays a detailed section of the referenced drawing. For example, you may have a master drawing containing a parts list. Each part entry can have an URL attached to it that references another DWF which displays the individual part details.

The following exercise walks through the process of using the ATTACHURL command to attach an URL to an area of a drawing.

USING ATTACHURL TO ATTACH AN URL TO A DRAWING

1. Open the drawing filter.dwg supplied on the accompanying CD-ROM.

2. From the Internet Utilities toolbar or Internet menu, choose Attach URL, or enter attachurl at the Command: prompt.

AutoCAD prompts you to attach an URL by defining an area or selecting objects.

3. Select Area by entering a at the Command: prompt.

4. Pick the top-left corner of the area defined by 1 and the lower-right corner of the second row defined by 2, as shown in figure 27.10.

5. At the Enter URL prompt, enter filter2.dwf.

AutoCAD creates a rectangle and stores the polylines defining the area on the special layer, URLLAYER.


Figure 27.10 Using the AttachURL by Object option places a rectangle into the drawing.

6. Save the drawing file with the changes as filter.dwg.

Don't worry about the file not existing yet. You'll create that file and the appropriate DWF counterparts in a minute.


NOTE: You may also select objects before invoking the ATTACHURL command, and then respond to the URL (Area/Objects) prompt with Area. AutoCAD will automatically place a rectangle around the extents of the objects you selected.


WARNING: The ATTACHURL command creates a rectangular entity on a layer named URLLAYER and then attaches the URL string to the new area entity as xdata. You can destroy the hyperlink information in your drawing if you tamper with URLLAYER! You should not freeze, lock, or change the visibility of URLLAYER. Do not edit or delete the area entities on URLLAYER, nor attach URLs to them using the ATTACHURL command. If you turn off the visibility of URLLAYER for normal viewing of your drawing, it should be turned back on before using the DWFOUT command.

Detaching an URL

Just as you may want to embed an URL in a file, you may also want to detach an already embedded URL (for instance, when a hyperlinked URL address has changed). DETACHURL removes an URL attached to an entity in the drawing file. You detach an URL from objects (or areas) in a drawing to remove the hyperlink to a web site identified by the attached URL. AutoCAD detaches the URL xdata (extended entity data) from the object in the drawing.

The following is an exercise to show you how to use the detach an URL from a drawing file.

USING DETACHURL TO REMOVE AN URL FROM A DRAWING FILE

1. Open the file detachurl.dwg from the CD-ROM included with this book.

2. From the Internet Utilities toolbar, choose Detach URL, or enter detachurl at the Command: prompt.

AutoCAD prompts you to select the objects associated with the URL you want to detach.

3. Select the area object AREAURL and the object OBJECTURL by using an object selection method, such as picking the objects or drawing a selection window around the text.


NOTTE: When you detach an URL from the object (OBJECTURL), AutoCAD removes the URL stored in the object's xdata. When you detach an URL from an area (AREAURL), AutoCAD deletes the rectangle that represents the area from the URLLAYER layer.

4. Save the file as detachurl.dwg to your local hard drive.

Listing URLs

The LISTURL command displays the URLs attached to objects or areas in a drawing. The following exercise shows you how to use this command.

USING THE LISTURL COMMAND TO DISPLAY EMBEDDED URLS

1. Open the drawing file filter.dwg, which you saved in the earlier ATTACHURL exercise.

2. From the Internet Utilities toolbar, choose List URLs, or enter listurl at the Command: prompt.

3. Select the area containing the URL you attached in the earlier "Using ATTACHURL to Attach an URL to a Drawing" exercise with a crossing window.

AutoCAD lists the URL filter2.dwf in the command and text windows, as shown in figure 27.11.

Keep this drawing loaded; it will be used in the next exercise.


Figure 27.11 LISTURL displays the URL address attached to the selected drawing objects or areas at both the Command: line and in the Release 14 Text Window.

Selecting Objects and Areas with URLs Attached

You can select all objects and areas that have URLs attached with the SELECTURL command, as shown in the following short exercise. AutoCAD puts all objects and areas that have URLs attached into the current selection set so you can edit them. This feature comes in handy when you need to update all of the hyperlink addresses attached to objects in your drawing.

SELECTING ALL OBJECTS AND AREAS WITH URLS ATTACHED USING SELECTURL COMMAND

1. From the Internet Utilities toolbar, choose Select URLs or enter selecturl at the Command: prompt.

AutoCAD selects all objects that have URLs attached.


NOTE: To list all the URLs in a drawing, use the SELECTURL command to select all objects with attached URLs and then use the LISTURL command to list the URLs.

Creating DWF Files with the DWFOUT Command

To create a DWF file with Release 14, use the DWFOUT command. The EXPORT function also supports creation of DWF files. Release 14 has an easy to use DWF Export Options sub-dialog box that facilitates creating DWF files, as shown in figure 27.12. The various settings in the dialog box are discussed in the following section.

Figure 27.12 The DWFOUT dialog box makes creating DWF files a simple task.


Precision and File Size

You can set the precision of your DWF files between 16 and 32 bits, with the default being 20 bits. For parts drawings and basic architectural drawings, using 16-bit precision gives you 40 percent smaller DWF files. With 16-bit precision, you can get as much as an 8-to-1 compression ratio when you compare the size of the original DWG file to the resulting DWF file.

For simple drawings, little visual difference exists. For more complex drawings and fine details, however, you'll need higher precision.

Using 20-bit precision produces a file 16 times more precise and only about 20 percent larger than a 16-bit file, but about 30 percent smaller than a full 32-bit file.

Background Color and File Size

The DWF file uses the background color from the original drawing file. To keep file size down, you can use a default color map and reduce file size by 1 KB. This savings is usually only beneficial to DWF files smaller than 5 KB. You can only use the default color map if the background color is black or white. By combining the use of a black or white background and 16-bit precision, you can reduce the size of your DWF files.

The Geometry Written to the DWF File

The geometry written to the DWF file is what the WHIP! display driver has in its display list. If the current view is a zoomed area of a larger drawing, then any geometry outside of the zoomed area isn't included in the DWF file. Commands that affect the visibility of geometry on-screen, such as VIEWRES, FACETRES, DISPSILH, and HIDE, also affect the contents of the DWF file.


WARNING: Currently, DWFOUT does not function from paper space. DWFOUT only works in model space and only exports data from the current model space viewport. The EXPORT method of creating a DWF file will work in paper space but you will only get the objects that are in paper space.

DWF files can be created from AutoCAD with either the DWFOUT or EXPORT command. You save a DWF file when you want to publish an AutoCAD drawing to the web in drawing web format. When creating DWF files in a batch process, use the text-only mode of the DWFOUT command by turning the FILEDIA system variable off (FILEDIA controls whether the file system dialog is displayed). If FILEDIA is set to 1 (on), an Explorer dialog box displays after entering the DWFOUT command at the Command: prompt. If FILEDIA is set to 0 (off) the text mode is active.

The following exercise focuses on creating a DWF file.

CREATING A DWF FILE BY USING THE DWFOUT AND EXPORT COMMANDS

1. Open the filter.dwg file, which you created in the ATTACHURL exercise.

2. Choose Export from the File pull-down menu (or type DWFOUT at the Command: prompt). As with other Export file types, a toolbar icon does not exist for this command. The DWF format is listed in the Files of Type list box in the EXPORT dialog box. The Options button activates the same sub-dialog box of options as in the DWFOUT dialog box (not the tabbed options dialog box normally displayed in the Export command). The DWFOUT Options dialog box has a Help button that is tied to AutoCAD's help file.

3. Accept the default DWF file name filter.dwf as displayed in the DWF File Save As dialog box. The current drawing file name with a .dwf extension is used as the default.

4. If you want to control the precision of the file, you must click on the Options button, then select either low (16-bit precision) or high (32-bit precision) detail. The default, 20-bit precision (medium), is sufficient for most files. The higher the precision, the larger the file. For the purposes of this exercise, you can accept the default precision value of medium.

5. If you want a compressed DWF file, you must click on the Options button, then select Compress File (it's on by default). Add compression to the DWF file by accepting the Yes default value.

6. Click on OK to exit the DWF Export Options sub-dialog box.


The DWF Export options are saved in ACAD14.CFG; therefore, the options chosen are saved between AutoCAD sessions.

Click on OK to exit the Create DWF File dialog box, thus creating the DWF file.


NOTE: The name of the drawing used to create a DWF is stored in the header of the DWF. The path of the drawing is not stored in the DWF and the file name is case-sensitive. This information is stored to give the Internet Utilities, the WHIP! plug-in, and Control for ActiveX drag-and-drop functionality when a DWF and DWG are located in the same directory.

In the next exercise, the DWF file--filter2.dwf--linked to by filter.dwf has to be created. This is the file called from the hyperlink that you attached to the parts list entry in filter.dwg.

CREATING A HYPERLINKED DWF FILE BY USING THE DWFOUT AND EXPORT COMMANDS

1. Open the file filter2.dwg included on the CD-ROM supplied with this book.

2. Type DWFOUT at the Command: prompt.

3. Click on the Options button to activate the DWFOUT dialog box.

4. Accept all the default values in this dialog box by clicking on OK.

5. Click on the OK button on the Create DWF file dialog box.

You've created the second DWF file, filter2.dwf.

To recap, you utilized the ATTACHURL command to create a relative URL that references another DWF file. When you load the filter.dwf into your browser and select the parts list entry containing the hyperlink, your browser will automatically load the file filter2.dwf. This simple example shows how you can use the power of Release 14's Internet tools to create a useful method for navigating complex drawings on the web.

Creating the Effective CAD-oriented Web Site

A great web site is like a well-designed building: you always know where you are and where to go. The entrance into the web site is the home page. It welcomes the visitor, makes them want to stay, and guides them to what they seek. Done well, the home page guides visitors where the publisher wants them to go. This section covers how to embed CAD data into an HTML and delivers some insights on how to build a web site.

Creating Web Pages Containing CAD Data

Because DWF and DWG are not considered standard MIME types, adding CAD data to an HTML requires a bit of effort. This section outlines the structure and methodology of properly embedding DWF files. If you use Autodesk's DWGX View plug-in, the same structure also applies to embedding a DWG file.

Adding DWF Files to HTML Pages

After you have created a DWF file, you can add it to a web page by adding special tags into the HTML document. There are two ways in which you can associate DWF files with HTML files: embedding and referencing. When "embedding" a DWF file into a HTML page, <object> and <embed> tags are used. Referencing is done through a traditional HREF tag.


NOTE: To publish your web pages to the Internet, you must have an Internet connection. If you already have an Internet connection, ask your Internet Service Provider or Webmaster how to put your files on the Internet server.

Object and Embed Tags

When embedding a DWF file into an HTML file the following two tags are used: <object> and <tag>. The <object> tag is used for Microsoft Internet Explorer. The <embed> tag is for Netscape Navigator. Netscape Navigator ignores the Microsoft Internet Explorer references and vice versa. These tags are specific to their respective browsers even though the embed tag is nested within the object tag. In the sample HTML provided, some of the parts are specific to DWF, that is, hardcoded, while others are under your control.

As you see in the exercise that follows, the parts of the <object> tag for the Microsoft Internet Explorer include:

The parts of the <embed> tag for Netscape Navigator include:


NOTE: The initial view is specified by using the name of the named view. If the specified named view has not been defined in the DWF file, the option is ignored. Either a NamedView or a View (not both) may be used to specify an initial view. The specified initial view overrides the initial view that is stored inside the DWF file. The parameters are case-insensitive.

These instructions explain how to embed a DWF file into an HTML document by adding special tags using an ASCII text editor. In this exercise, you will be using an HTML template to simplify the process for adding a DWF to an HTML page. The exercise will show you how to use this template for DWF embedding.

EMBEDDING A DWF FILE INTO AN HTML DOCUMENT

1. Start your text editor and create a DWF--HTML template by copying the following code as it appears in the following code. The template uses "dummy" names and values as placeholder references. In this exercise, you will replace the placeholder text with actual file names and values.


NOTE: You should save the DWF--HTML template code into a separate file (I named my template dwftags.htm) before proceeding to step 2.
<object
 id="dwfname"
 classid="clsid:B2BE75F3-9197-11CF-ABF4-08000996E931"
codebase="ftp://ftp.autodesk.com/pub/autocad/plugin/whip.cab#version=2,0,14,76"
 width=600
 height=400>
<param name="Filename"  value="dwfname.dwf">
<param name="View"      value="10000+30000+20000+40000">
<param name="NamedView" value="viewname">
<param name="UserInterface" value="on">
<embed name="dwfname"   src="dwfname.dwf"
 pluginspage="http://www.autodesk.com/products/autocad/whip/    ¬whip.htm"
 width=600
 height=400
 view="10000+30000+20000+40000"
 namedview="viewname"
 userinterface="on">
</object>

2. Open the sample HTML document in your text editor, filter.htm, supplied with this book's CD-ROM.

3. Insert the DWF--HTML template (created in step 1) into the HTML document at the point 1 specified in figure 27.13. This is the location following the page description title that you want the DWF file to appear in the document.

Figure 27.13 1 shows where the DWF file will appear in the document.

4. Modify the merged text as follows:


NOTE: This step shows you how easy it is to change the DWF file reference and image size using the HTML template.

5. Save the file in HTML format.

6. Load and view the file in your browser.

Your completed file should appear as shown in figure 27.14


Figure 27.14 The HTML page as it appears after successful completion of the exercise.


Referencing with HREF Tag

Referencing a file using the HREF tag is a common method of associating non-HTML files (for example DWF or JPG files) with an HTML file. Using an HREF tag causes the DWF file to appear as a link in the HTML page. When the link is selected, the DWF file occupies the entire window available to the HTML file. The other parts of the HTML file are not visible, so the DWF file does not appear to be "embedded" as part of the current HTML file.

The format used in an HREF tag is as follows:

<A HREF=http://myserver/myfile.dwf>myfile.dwf</A>

URL Format Information

The general format of a Uniform Resource Locator (URL) is:

http://www.company.com/path/file.suffix#option=value

where the suffix is typically html, htm, or dwf. For the purposes of DWF, the HREF tag option portion can be any of the following:

Each of these options is explained in the following sections.

Target Option

The target option indicates that the current link is to be loaded into a specified frame window. In a CAD web site, you may want to embed DWF files into HTML pages using frames. Frames can separate active HTML pages containing DWF files from static pages such as a navigational bar. A frame is a window into a specific URL. The frame window name specified by a target must begin with an alpha-numeric character, for example, target=mywindow.

Working with frames can be tricky, but DWF files support certain "magic" window frame names to simplify programming a CAD-based HTML page. Magic window frame names are used by HTML targets inside of a frame to initiate specific behavior. Some magic window frame names have special properties. These magic window names begin with an underscore and are summarized in table 27.1.

Table 27.1 DWF Magic Window Name Options and Descriptions

Name Description
target="_blank" The link loads in a new blank window.
target="_self" The link loads in to the same window the link is in. This link is only useful for overriding a globally assigned target, which is different than the current window.
target="_parent" The link loads in the immediate frameset parent of the current document. It defaults to "_self" if the document has no parent.
target="_top" The link loads in a full window and exits the frame. This option is useful for leaving your site or exiting a deep frame nesting.


NOTE: Any targeted window name beginning with underscore that is not one of the preceding options will be ignored.

Namedview Option

The namedview option specifies a particular named view of a DWF file reference by using an existing named view already inside the DWF file. If a named view does not exist in the DWF file, the namedview option is ignored.

View Option

The view option specifies a particular view of a DWF file reference by using DWF file coordinates.

You can specify a #option=value item by itself, that is, without the preceding URL information, and have that option apply to the current instance. URLs of this type are always preceded by the # symbol.


NOTE: Microsoft Internet Explorer does not support the view, namedview, and user interface HREF tag options.

Adding DWF Files as a MIME Type

To get your Internet server to recognize DWF files so that WHIP! gets invoked, you need to ask your Webmaster to add a new MIME type to your Internet server. The server software MIME environment needs to have a new data type drawing/x-dwf with the extension as dwf added. MIME types enable files to be opened by "helper" applications on web browser clients, such as Microsoft Internet Explorer. Users who have not added the MIME type but try to view DWF files from their own servers experience the Torn icon. If you experience the Torn icon, you must also add the MIME type and then clear your browser cache to achieve correct results.

If you are using the Netscape FastTrack Server, follow these steps to add the new MIME type:

1. Search your drive(s) for the file mime.types.

2. Open each instance of the file with Notepad or another ASCII text editor.

3. Add the text type=drawing/x-dwf exts=dwf to the file (at the bottom of the file is OK).

4. Save the file and repeat for each instance of the mime.types file just to be safe.

5. Fully apply the changes by using your server software. Alternatively, you could shut down and reboot the server.

If you are using Microsoft's Internet Information Server 2.0, you can find instructions for adding MIME types at:

http://www.microsoft.com/kb/articles/q142/5/58.htm

Currently, MIME types for Internet Information Server (IIS) must be added manually to the registry. At this time, no graphical interface for adding MIME types exists. IIS installs the most common MIME types by default, but MIME types for new applications such as WHIP! are not among those added by default.

MIME entries can be added to the following registry location:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ InetInfo\Parameters\MimeMap

To add an entry, open the MimeMap key and choose Edit Value or Add Value. The MIME information needs to be placed in the Value Name box. You should set the data type for the entry to REG_SZ and leave the string field blank. The following is an example of a MIME entry:

drawing/x-dwf,dwf,,l:REG_SZ:

The unused field is represented by an extra comma between "dwf" and the letter "l" (lowercase L). The extra comma must be included for the MIME type to work correctly.

Elements of a CAD-oriented Web Site

Some basic elements comprise a good CAD web site. These elements, which are explained further in the following sections, are common to most compelling sites and include:

Company Information

Including background information about your company helps paint a picture of a successful firm to do business with. Focus on presenting company information in a "lightweight" format. That is, don't get too heavy on the surface because you don't want to bore visitors to your site with dry corporate data. You can always place the detailed company information in secondary pages linked to the main page. Visitors who are interested in getting more data can "double-click down" to the more detailed pages.

Portfolio

Use your web site to market your company by posting a portfolio of your work. Use the AutoCAD Release 14 Internet tools and the exercises included in this chapter to create HTML pages containing DWF files representing your best work. Make certain to include customer testimonials, awards, press releases, published articles, and related marketing materials. You want visitors to download or print this type of prestigious information. Your site could attract audiences that you may never have anticipated, so blow your own horn and strut your stuff, but be sure to have compelling, valuable, CAD-based content to complement your marketing.

Feedback Mechanisms

Providing a method for eliciting feedback from visitors to your web site is critical. This method can be as simple as including "mailto" options or as sophisticated as a registration site and chat room. You want people to ask questions about your services or products, so have the infrastructure in place to rapidly provide a brief recognition of any e-mail sent. If you can budget the resources, a method for delivering answers in a timely fashion goes a long way toward building great customer relationships.

Use a registration form to elicit profile information of visitors to your site. You might consider offering some type of "freebie" to encourage registration. Building a profile of the visitors to your site provides invaluable insights into the needs of your customer base.

Marketing Your Work

Your web site is your company's presence on the World Wide Web. There are major advantages to having your own site, if you know how to attract the right audience. A fundamental rule is to publish something of value for your audience. You want your site to compel prospective clients to visit and explore. Including information that is free, educational, and useful to your audience always works well. Having links to other CAD related sites of interest (such as http://www.autodesk.com) also increases the value of your site. In your site, provide promotional cues leading to areas where an exchange of value can take place, like a sale of a product or service. An architectural firm may feature home designs, or a lighting manufacturer can include DWG data for insertion into drawings. For a design firm, having a CAD- oriented web site opens countless possibilities for expanding your market.

You can take the following steps to ensure that your site can be found easily by those you want to attract:

Another good reason to have a web site is to provide your employees with remote access to company information, and through it, to the Internet for business reasons. Remote access is especially valuable for field personnel in construction, manufacturing, and sales.

Now that you've envisioned your web site, how do you create it and where do you put it? Fortunately, you have many options to match your enthusiasm, need, and budget. The next section examines some of these options.

Building a Web Site

An entry-level webmaster might consider using one of the online services offered by CompuServe or America Online. These vendors have simple facilities for creating and maintaining basic web sites for a monthly fee. However, these vendors offer a very limited amount of space on their server, which may make it difficult for you to build the type of CAD web site you want.

What if you want to create a more sophisticated site than America Online or CompuServe provides, but don't want to spend a lot on a professional web designer? Many excellent web site authoring packages are available that automate HTML code generation. These modern Windows-based tools support drag-and-drop HTML page construction and are highly visual in nature. Despite many packages having automated page creation features, you still have to embed DWF files into your CAD-oriented HTML pages. Check out Netscape Communicator or Microsoft's FrontPage as basic examples of this functionality.

So maybe this all sounds easy and wonderful, but you're too busy drafting to spend any time building a CAD-based web site. What can you do? Perhaps you should consider hiring a professional web design firm to create your site. If you can afford it, this strategy has numerous benefits. The cost can vary from several thousand to hundreds of thousands of dollars. An experienced web site design firm can really help you showcase your designs and get your message across to your audience.

Self-Hosting Your Web Site versus Using an ISP

The effort you invest in creating your own site can grow with your requirements and budget. You do not need to wait because the sophistication of your site can grow along with your needs. After you've created your site, where do you put it? The simplest method may be for you to start by renting a partition on a server with an Internet connection, and expand as presence grows. You also have the option of setting up your own server or maintaining your home page with a service provider. Many Internet Service Providers offer this option, as do major online proprietary services. If you want your own server, turnkey systems are available from Sun Microsystems, DEC, and others that include the hardware and software you need. Keep in mind that you will still have to arrange for your server to be "plugged in" to the network, and the cost for this can vary widely depending on the speed of your connection. Visitors to your site generally will not tolerate slow response time--even if your content is very compelling.

As a web publisher or intranet manager, you want to have your site linked to the net via a T1 connection. A T1 connection can be either shared with others (fractional T1) or dedicated solely to your server. Your connection decision should be based on balancing the cost against the traffic you anticipate on your site. If you expect thousands of visitors, or hits, per day or during peak times, you may need a dedicated T1 or faster. If you can't afford a T1, you should consider hosting your site with a service provider that has a link to the Internet backbone. Satellite services are also available for Internet and intranet publishers.

Utilizing "Push" Technologies

So now that you have a site on the web, how do you keep your clients, contractors, or other visitors apprised of changes to the drawing information displayed on your HTML pages or drawing files required for a specific project? Keeping subcontractors in sync or customers informed of changes to your web site can be a difficult task. A simple solution to this situation can be handled through site registration and offering an e-mail service notifying clients of any changes to the site. In addition, more sophisticated solutions involve utilizing software that implements Internet "push" technology. In essence, a push application sends updated information (such as revised DWG files) to subscribers that have set a filter requesting that they receive changes to these files.

For example, say you are a general contractor involved in coordinating numerous subcontractors on a large airport construction project. Changes to the base DWG file occur on a nearly daily basis, and you must get these updates out to the field each day. By using a push server (such as Marimba's Castanet Transmitter), you can "push" updated drawings on a daily (or hourly) basis to each subcontractor. This new Internet technology is becoming very commonplace. Both Netscape's Communicator NetCaster feature and the forthcoming Active Desktop of Microsoft's Internet Explorer 4.0 have embraced push functionality.


TIP: Push technology can be a great asset to your web site. I believe that all industries that depend on staying in synch with distributed information must utilize this technology.

Using Other Web Tools

For those of you who are serious about using the Internet and AutoCAD, this section discusses the additional plug-ins and development tools that you can add to control Internet data in Release 14 and at your web site. The web changes so rapidly that some of this information may be out of date by the time you read this book. Therefore, you can use this section as a guide and expect updates to have occurred since this book was written.

Java

Java is the programming language of the web and is highly platform-independent and similar in structure to the C/C++ languages, but without the dependencies on pointers. You can integrate Java routines into your existing AutoCAD programming environment.

Using Java and JavaScript with DWF Files in HTML Pages

To Java enable HTML pages containing DWF files, you have to add two tags--<script> and <form>--to the HTML file. As mentioned earlier in this chapter, the <embed> tag has a name="drawingname" reference parameter. This reference is very important for Java development because Java functions reference the <embed> tag's name parameter. These references are contained in the <script> portion of your HTML file.

If you want to set control buttons to manipulate the DWF file, you have to use the <form> tag. Again, Java references the <embed> tag's name= parameter when calling a function to activate the navigational control button.

With the <embed> tag name= reference properly used, you can use the <script> and <form> tags to implement a great deal of interactivity to your web pages. DWF files and WHIP! can be manipulated with Java. You can use Java to extract named views from DWF files. With Java it is also possible to embed links to the named views into an HTML page. With some elementary programming skill you can build an interactive navigational front end to your CAD-based web site.

AutoLISP

You can use AutoLISP to manipulate URLs attached to objects or areas in an AutoCAD DWG file. This section details some of the basic mechanisms available to AutoLISP programmers.

Integration with AutoLISP

The AutoLISP Internet functions require that the Internet Utilities be loaded to operate. Two handy functions when working with URLs and AutoLISP are seturl and geturl.

Use the seturl function to attach an URL to an object. This function requires two variables to be passed to it: the entity name and the URL string.

The counterpart to seturl is geturl. Use geturl to return the URL string attached to an object.

Accessing URL Information Using AutoLISP

Two AutoLISP functions, allurls and pickurls, provide a powerful environment to aid in accessing URL information. Scroll a list of all the URLs contained in a DWG file to the AutoCAD Command: line with allurls. Use pickurls to scroll a list of all the URLs contained in a selection set. Neither function removes duplicate URL data from the list.

Important Formats and Plug-ins

No CAD-oriented Internet environment is complete without a number of plug-ins or controls. The following sections discuss some of the plug-ins that are useful when working with CAD data on the web.

VRML2

VRML2, or Virtual Reality Modeling Language Revision 2, is a recent update to the Internet's three-dimensional graphics communications protocols. VRML is used to present a three-dimensional navigational view of a web site. You can consider a VRML "room" the 3D evolutionary equivalent of a 2D HTML-based web page. In a year or two, VRML may become the defacto interface standard for navigating the Internet.

Perhaps some analogies of basic behavior will help you understand the similarities between HTML and VRML a bit more. VRML expands the two-dimensional interface of HTML into three dimensions. Like HTML, VRML supports hypertext links (targets or anchors). Selecting a link embedded into an HTML page can send you to another web site located elsewhere on the Internet. With VRML, selecting a 3D object (such as a door) can transport you to another VRML room located somewhere else on the Internet. Also like HTML, VRML supports inlines (objects embedded into the page that are not native to the page itself). With an HTML page, the DWF file does not have to reside in the same location as the text for the HTML page itself. The same paradigm exists for VRML; in essence, any object containing a hyperlink (for example, the door) can exist in a location (directory, server, web site, and so on) separate from the VRML file.


TIP: If you want to experiment with VRML2 browsing, I suggest obtaining a copy of CosmoPlayer from Silicon Graphics (http://webspace.sgi.com/cosmoplayer/ download.html). Cosm oPlayer is the premier VRML 2.0 browser tool, compliant with the VRML 2.0 specification, and supports interpolators, script nodes, sensors, and 3D sound. SGI & Netscape have entered into a partnership to integrate Live3D with CosmoPlayer. If you want to explore the 3D world of the net, you should get CosmoPlayer.

PDF

If you are going to create an engineering document web site, you may have a need to create portable document format (PDF) files. PDF encapsulates a business document into universal, platform-independent file format. Adobe Acrobat is a PDF creation tool that, according to Adobe marketing materials, "enables you to create and share business documents on a cross-platform basis while they maintain their original look and feel."


NOTE: According to Adobe Systems, "Acrobat software is the fastest way to publish any document online." That very well may be, but putting the hype aside for a moment, I do find that viewing PDF files is useful and may be required at certain web sites. The free Adobe Acrobat Reader enables you to view, navigate, and print PDF files across all major computing platforms.

You can download the Acrobat Reader from the Adobe Systems web site at: http://www.adobe.com/prodindex/acrobat/readstep.html. For more information on Acrobat, contact Adobe at http://www.adobe.com/prodindex/acrobat/main.html.

Marimba Castanet

Castanet automatically distributes and maintains software applications and content within a company or across the Internet. The Castanet Transmitter (server) and Castanet Tuner (client) work together to keep software and content always up-to-date. Create a "channel" and place it on a Castanet Transmitter. Castanet automatically distributes, installs, maintains, and updates the channel, all via the Internet. Castanet can support any type of channel: internal corporate applications, multi-media consumer channels, and more.

Hyperwire

The Kinetix division of Autodesk has a product called Hyperwire that enables you to create dynamic, interactive, 3D content and harness the power of Java without writing a single line of code. This product is a boon for those of us who want to create cool interactive web sites, but don't want to get bogged down with writing Java code. Kinetix claims that, "Hyperwire is a powerful 3D authoring tool that integrates seamlessly with 3D Studio MAX and other VRML applications." Hyperwire can be used to manipulate DWF files and WHIP!. Check out the AutoCAD Internet Publishing Kit for a great example of Hyperwire controlling WHIP! and displaying DWF files.


NOTE: I consider Hyperwire another product in the realm of visual development tools (such as Symantec's Visual Café or Microsoft's Visual Basic) that have become so popular of late.

For more information, visit the Kinetix web site at http://www.ktx.com/hyperwire/hwhome.html-ssi.

QuickTime

QuickTime is the multiplatform, industry-standard multimedia architecture used by software tool vendors and content creators to create and deliver synchronized graphics, sound, video, text, and music. QuickTime is an excellent choice for "author once, playback anywhere" multimedia. Numerous development tools exist for creating QuickTime files. To find out more about QuickTime and associated development tools, point your browser to http://quicktime.apple.com.

Shockwave

Shockwave is a family of multimedia authoring tools and players, designed to give you a wide range of interactive experiences on the web. The Shockwave player is used by many web authors for presenting interactive multimedia display and content. One drawback to Shockwave is that it is a proprietary Macromedia format supported only by their products (such as Director). Creating Shockwave files requires that you use a Macromedia application. For more information, check out http://www.macromedia.com/shockwave/intro.html.

Summary

In this chapter, you have learned how to use a web-enabled Release 14 to view, access, and publish CAD to the web. You now know how to use the Internet Utilities to open, insert, or save DWG files to the Internet. In addition, you have also learned about attaching URLs to objects in your DWG files and how to link one file to another. This chapter has also discussed the ins and outs of publishing CAD data on the web with Release 14.

Hopefully, your appetite for building a web site has been whetted. The next chapter, "Project Collaboration over the Internet," studies a live site and provides an in-depth analysis of what it takes to manage an effective CAD web site.

Happy surfing!


Previous chapterNext chapterContents

© Copyright, Macmillan Computer Publishing. All rights reserved.